<template>
    <div class="error-authorize">
        <div class="img-box">
            <img src="@/assets/images/common/error-authorize.png" />
        </div>
        <p>{{ message }}</p>
        <div class="footer">
            <a class="kefu" @click="$router.push('/index')"><i class="iconfont icon-shouye"></i>返回首页</a>
            <a class="connect" @click="authorize"><i class="iconfont icon-taobao"></i>重新绑定</a>
        </div>
    </div>
</template>

<script>
	export default {
		name: 'errorAuthorize',
        data() {
			return {
				message: '授权失败'
            }
        },
        created() {
			if (this.$route.query.message) {
				this.message = this.$route.query.message;
            }
        },
        methods: {
			authorize() {
				let params = {
					backUrl: '/index',
				};
				this.$service.shopping.taobao.getlink(params).then(res => {
					window.location.href = res;
				});
			},
        }
	};
</script>

<style lang="scss" scoped>
    .error-authorize {
        height: 100%;
        background: $color-white;
        .img-box {
            width: 60%;
            padding-top: 260px;
            margin: 0 auto 30px;
        }
        p {
            padding: 0 80px;
            text-align: center;
            font-size: 24px;
            color: #666666;
        }
        .footer {
            width: 100%;
            display: flex;
            justify-content: center;
            margin-top: 100px;
            a {
                width: 202px;
                height: 68px;
                border: 2px solid #F70114;
                font-size: 28px;
                border-radius: 50px;
                display: flex;
                margin: 0 50px;
                justify-content: center;
                align-items: center;
                color: $main-color;
                i {
                    margin-right: 10px;
                    font-size: 40px;
                }
            }
            .connect {
                background: $main-color;
                color: $color-white;
            }
        }
    }
</style>